Implement grab_focus for GtkComboBox and GtkComboBoxEntry. (#171912,
authorMatthias Clasen <mclasen@redhat.com>
Wed, 6 Apr 2005 04:01:19 +0000 (04:01 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Wed, 6 Apr 2005 04:01:19 +0000 (04:01 +0000)
2005-04-05  Matthias Clasen  <mclasen@redhat.com>

* gtk/gtkcomboboxentry.c (gtk_combo_box_entry_grab_focus):
* gtk/gtkcombobox.c (gtk_combo_box_grab_focus): Implement
grab_focus for GtkComboBox and GtkComboBoxEntry.  (#171912,
Gustavo Carneiro)

ChangeLog
ChangeLog.pre-2-10
ChangeLog.pre-2-8
gtk/gtkcombobox.c
gtk/gtkcomboboxentry.c

index 8f01dd964a579b102c36ecc27040d3b4c8ba4da1..867ec6e5bde819bf156743fcceaea9dc875a3c42 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2005-04-05  Matthias Clasen  <mclasen@redhat.com>
 
+       * gtk/gtkcomboboxentry.c (gtk_combo_box_entry_grab_focus): 
+       * gtk/gtkcombobox.c (gtk_combo_box_grab_focus): Implement
+       grab_focus for GtkComboBox and GtkComboBoxEntry.  (#171912,
+       Gustavo Carneiro)
+
        * gtk/gtkicontheme.c: Store icon caches along with the
        mtimes of the toplevel directories. The previous
        mechanism of a hashtable-per-theme caused duplicate icon
index 8f01dd964a579b102c36ecc27040d3b4c8ba4da1..867ec6e5bde819bf156743fcceaea9dc875a3c42 100644 (file)
@@ -1,5 +1,10 @@
 2005-04-05  Matthias Clasen  <mclasen@redhat.com>
 
+       * gtk/gtkcomboboxentry.c (gtk_combo_box_entry_grab_focus): 
+       * gtk/gtkcombobox.c (gtk_combo_box_grab_focus): Implement
+       grab_focus for GtkComboBox and GtkComboBoxEntry.  (#171912,
+       Gustavo Carneiro)
+
        * gtk/gtkicontheme.c: Store icon caches along with the
        mtimes of the toplevel directories. The previous
        mechanism of a hashtable-per-theme caused duplicate icon
index 8f01dd964a579b102c36ecc27040d3b4c8ba4da1..867ec6e5bde819bf156743fcceaea9dc875a3c42 100644 (file)
@@ -1,5 +1,10 @@
 2005-04-05  Matthias Clasen  <mclasen@redhat.com>
 
+       * gtk/gtkcomboboxentry.c (gtk_combo_box_entry_grab_focus): 
+       * gtk/gtkcombobox.c (gtk_combo_box_grab_focus): Implement
+       grab_focus for GtkComboBox and GtkComboBoxEntry.  (#171912,
+       Gustavo Carneiro)
+
        * gtk/gtkicontheme.c: Store icon caches along with the
        mtimes of the toplevel directories. The previous
        mechanism of a hashtable-per-theme caused duplicate icon
index 67e8dc2966b85eb3afde41704941ca07df8d2b93..0d80a5cf221774528904e234b5ef746b79faec6f 100644 (file)
@@ -221,7 +221,7 @@ static void     gtk_combo_box_get_property         (GObject         *object,
                                                     GParamSpec      *spec);
 
 static void     gtk_combo_box_state_changed        (GtkWidget        *widget,
-                                                   GtkStateType      previous);
+                                                   GtkStateType      previous);static void     gtk_combo_box_grab_focus           (GtkWidget       *widget);
 static void     gtk_combo_box_style_set            (GtkWidget       *widget,
                                                     GtkStyle        *previous);
 static void     gtk_combo_box_button_toggled       (GtkWidget       *widget,
@@ -506,6 +506,7 @@ gtk_combo_box_class_init (GtkComboBoxClass *klass)
   widget_class->expose_event = gtk_combo_box_expose_event;
   widget_class->scroll_event = gtk_combo_box_scroll_event;
   widget_class->mnemonic_activate = gtk_combo_box_mnemonic_activate;
+  widget_class->grab_focus = gtk_combo_box_grab_focus;
   widget_class->style_set = gtk_combo_box_style_set;
   widget_class->state_changed = gtk_combo_box_state_changed;
 
@@ -4794,6 +4795,14 @@ gtk_combo_box_mnemonic_activate (GtkWidget *widget,
   return TRUE;
 }
 
+static void
+gtk_combo_box_grab_focus (GtkWidget *widget)
+{
+  GtkComboBox *combo_box = GTK_COMBO_BOX (widget);
+
+  gtk_widget_grab_focus (combo_box->priv->button);
+}
+
 static void
 gtk_combo_box_destroy (GtkObject *object)
 {
@@ -5163,5 +5172,6 @@ gtk_combo_box_get_focus_on_click (GtkComboBox *combo)
   return combo->priv->focus_on_click;
 }
 
+
 #define __GTK_COMBO_BOX_C__
 #include "gtkaliasdef.c"
index d5f54a0c59ad54a3a0330ced6dff0522b588032b..c3f000ad1e12baac08f1f1651259a700dbf9a7c0 100644 (file)
@@ -57,6 +57,7 @@ static void gtk_combo_box_entry_contents_changed (GtkEntry              *entry,
                                                   gpointer               user_data);
 static gboolean gtk_combo_box_entry_mnemonic_activate (GtkWidget        *entry,
                                                       gboolean          group_cycling);
+static void gtk_combo_box_entry_grab_focus       (GtkWidget *widget);
 static void has_frame_changed                    (GtkComboBoxEntry      *entry_box,
                                                  GParamSpec            *pspec,
                                                  gpointer               data);
@@ -110,6 +111,7 @@ gtk_combo_box_entry_class_init (GtkComboBoxEntryClass *klass)
 
   widget_class = (GtkWidgetClass *)klass;
   widget_class->mnemonic_activate = gtk_combo_box_entry_mnemonic_activate;
+  widget_class->grab_focus = gtk_combo_box_entry_grab_focus;
 
   combo_class = (GtkComboBoxClass *)klass;
   combo_class->get_active_text = gtk_combo_box_entry_get_active_text;
@@ -359,6 +361,15 @@ gtk_combo_box_entry_mnemonic_activate (GtkWidget *widget,
   return TRUE;
 }
 
+static void
+gtk_combo_box_entry_grab_focus (GtkWidget *widget)
+{
+  GtkComboBoxEntry *entry_box = GTK_COMBO_BOX_ENTRY (widget);
+
+  gtk_widget_grab_focus (entry_box->priv->entry);
+}
+
+
 
 /* convenience API for simple text combos */